# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models


class Migration(SchemaMigration):

    def forwards(self, orm):
        # Adding model 'ModelAddition'
        db.create_table('additions_modeladdition', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('model', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('course', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('required', self.gf('django.db.models.fields.BooleanField')(default=False)),
            ('type', self.gf('django.db.models.fields.CharField')(max_length=6)),
            ('number', self.gf('django.db.models.fields.IntegerField')(blank=True)),
            ('description', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
            ('default', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
        ))
        db.send_create_signal('additions', ['ModelAddition'])

        # Adding unique constraint on 'ModelAddition', fields ['model', 'name']
        db.create_unique('additions_modeladdition', ['model', 'name'])

        # Adding model 'BooleanAddition'
        db.create_table('additions_booleanaddition', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('instanceid', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('modeladdition', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['additions.ModelAddition'])),
            ('value', self.gf('django.db.models.fields.BooleanField')(default=False)),
        ))
        db.send_create_signal('additions', ['BooleanAddition'])

        # Adding model 'CharAddition'
        db.create_table('additions_charaddition', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('instanceid', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('modeladdition', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['additions.ModelAddition'])),
            ('value', self.gf('django.db.models.fields.CharField')(max_length=255)),
        ))
        db.send_create_signal('additions', ['CharAddition'])

        # Adding model 'IntAddition'
        db.create_table('additions_intaddition', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('instanceid', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('modeladdition', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['additions.ModelAddition'])),
            ('value', self.gf('django.db.models.fields.IntegerField')()),
        ))
        db.send_create_signal('additions', ['IntAddition'])

        # Adding model 'FloatAddition'
        db.create_table('additions_floataddition', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('instanceid', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('modeladdition', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['additions.ModelAddition'])),
            ('value', self.gf('django.db.models.fields.FloatField')()),
        ))
        db.send_create_signal('additions', ['FloatAddition'])

        # Adding model 'TextAddition'
        db.create_table('additions_textaddition', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('instanceid', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('modeladdition', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['additions.ModelAddition'])),
            ('value', self.gf('django.db.models.fields.TextField')()),
        ))
        db.send_create_signal('additions', ['TextAddition'])


    def backwards(self, orm):
        # Removing unique constraint on 'ModelAddition', fields ['model', 'name']
        db.delete_unique('additions_modeladdition', ['model', 'name'])

        # Deleting model 'ModelAddition'
        db.delete_table('additions_modeladdition')

        # Deleting model 'BooleanAddition'
        db.delete_table('additions_booleanaddition')

        # Deleting model 'CharAddition'
        db.delete_table('additions_charaddition')

        # Deleting model 'IntAddition'
        db.delete_table('additions_intaddition')

        # Deleting model 'FloatAddition'
        db.delete_table('additions_floataddition')

        # Deleting model 'TextAddition'
        db.delete_table('additions_textaddition')


    models = {
        'additions.booleanaddition': {
            'Meta': {'object_name': 'BooleanAddition'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'instanceid': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'modeladdition': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['additions.ModelAddition']"}),
            'value': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
        },
        'additions.charaddition': {
            'Meta': {'object_name': 'CharAddition'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'instanceid': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'modeladdition': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['additions.ModelAddition']"}),
            'value': ('django.db.models.fields.CharField', [], {'max_length': '255'})
        },
        'additions.floataddition': {
            'Meta': {'object_name': 'FloatAddition'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'instanceid': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'modeladdition': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['additions.ModelAddition']"}),
            'value': ('django.db.models.fields.FloatField', [], {})
        },
        'additions.intaddition': {
            'Meta': {'object_name': 'IntAddition'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'instanceid': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'modeladdition': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['additions.ModelAddition']"}),
            'value': ('django.db.models.fields.IntegerField', [], {})
        },
        'additions.modeladdition': {
            'Meta': {'unique_together': "(('model', 'name'),)", 'object_name': 'ModelAddition'},
            'course': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'default': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'model': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'number': ('django.db.models.fields.IntegerField', [], {'blank': 'True'}),
            'required': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'type': ('django.db.models.fields.CharField', [], {'max_length': '6'})
        },
        'additions.textaddition': {
            'Meta': {'object_name': 'TextAddition'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'instanceid': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'modeladdition': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['additions.ModelAddition']"}),
            'value': ('django.db.models.fields.TextField', [], {})
        }
    }

    complete_apps = ['additions']